<include file="public@header"/>
<script src="__STATIC__/js/listtable.js"></script>
</head>
<body>
    <div class="layui-fluid js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="{:url('AdminBranch/index',array('b_r_id'=>$filter['b_r_id']))}">{:lang('PORTAL_ADMINBRANCH_INDEX')}</a></li>
            <li><a href="{:url('AdminBranch/add',array('b_r_id'=>$filter['b_r_id']))}">{:lang('PORTAL_ADMINBRANCH_ADD')}</a></li>
        </ul>

        <form class="well form-inline margin-top-20 form-search" method="post" action="{:url('AdminBranch/index')}">
            {:lang('B_NAME')}： 
            <select name="b_r_id" class="layui-input" style="">
                <option value='0'>全部</option>
                {$branch_region_list}
            </select> &nbsp;&nbsp;
            
            关键字： 
            <input type="text" name="keyword" class="layui-input" style="" value="{$filter.keyword|default=''}" placeholder="请输入关键字...">

            <!-- 用于列表排序 -->
            <input type="hidden" name="sort_by" value="{$filter.sort_by}">
            <input type="hidden" name="list_order" value="{$filter.list_order}">
            <!-- 用于列表排序 -->

            <input type="submit" class="layui-btn layui-btn-normal" value="搜索" />
            <a class="layui-btn layui-btn-danger layui-btn-sm" href="{:url('AdminBranch/index')}">清空</a>
        </form>

        <form method="post" class="js-ajax-form" action="{:url('AdminBranch/listOrder')}">
            <input type="hidden" name="b_r_id" value="{$b_r_id}">
            <div class="table-actions">
                <notempty name="b_r_id">
                    <button type="submit" class="layui-btn layui-btn-normal btn-small js-ajax-submit">{:lang('SORT')}</button>
                </notempty>
                <button class="layui-btn layui-btn-danger layui-btn-sm btn-small js-ajax-submit" type="submit" data-action="{:url('AdminBranch/delete')}" data-subcheck="true" data-msg="您确定删除吗？">{:lang('DELETE')}</button>
            </div>
            <table class="layui-table">
                <thead>
                    <tr>
                        <th width="20"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
                        <notempty name="b_r_id">
                            <th width="65"><a href="javascript:list_sort('list_order'); ">{:lang('SORT')}</a>{$sort_list_order}</th>
                        </notempty>
                        <th width="50"><a href="javascript:list_sort('branch_id'); ">ID</a>{$sort_branch_id}</th>
                        <th><a href="javascript:list_sort('branch_name'); ">{:lang('BRANCH_NAME')}</a>{$sort_branch_name}</th>
                        <th><a href="javascript:list_sort('b_r_id'); ">{:lang('B_NAME')}</a>{$sort_b_r_id}</th>
                        <th width="160">{:lang('ACTIONS')}</th>
                    </tr>
                </thead>
                <tbody>
                    <foreach name="list" item="vo">
                        <tr>
                            <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.branch_id}" title="ID:{$vo.branch_id}"></td>
                            <notempty name="b_r_id">
                                <td>
                                    <input name="list_orders[{$vo.branch_id}]" class="input-order" type="text" value="{$vo.list_order}">
                                </td>
                            </notempty>
                            <td>{$vo.branch_id}</td>
                            <td>{$vo.branch_name}</td>
                            <td>{$vo.b_name}</td>
                            <td>
                                <a href="{:url('AdminBranch/edit',array('id'=>$vo['branch_id']))}">{:lang('EDIT')}</a> | 
                                <a href="{:url('AdminBranch/delete',array('id'=>$vo['branch_id']))}"  class="js-ajax-delete">{:lang('DELETE')}</a>
                            </td>
                        </tr>
                    </foreach>
                </tbody>
                <tfoot>
                    <tr>
                        <th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
                        <notempty name="b_r_id">
                            <th width="65"><a href="javascript:list_sort('list_order'); ">{:lang('SORT')}</a>{$sort_list_order}</th>
                        </notempty>
                        <th width="50"><a href="javascript:list_sort('branch_id'); ">ID</a>{$sort_branch_id}</th>
                        <th><a href="javascript:list_sort('branch_name'); ">{:lang('BRANCH_NAME')}</a>{$sort_branch_name}</th>
                        <th><a href="javascript:list_sort('b_r_id'); ">{:lang('B_NAME')}</a>{$sort_b_r_id}</th>
                        <th width="160">{:lang('ACTIONS')}</th>
                    </tr>
                </tfoot>
            </table>
            <div class="table-actions">
                <notempty name="b_r_id">
                    <button type="submit" class="layui-btn layui-btn-normal btn-small js-ajax-submit">{:lang('SORT')}</button>
                </notempty>
                <button class="layui-btn layui-btn-danger layui-btn-sm btn-small js-ajax-submit" type="submit" data-action="{:url('AdminBranch/delete')}" data-subcheck="true" data-msg="您确定删除吗？">{:lang('DELETE')}</button>
            </div>
            <ul class="pagination">{$page|default=''}</ul>
        </form>
    </div>
    
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>

